From 22554a161f2001c006b5254bf835887ebd8cadec Mon Sep 17 00:00:00 2001 From: Kristian Rietveld Date: Wed, 13 Jul 2005 11:57:10 +0000 Subject: [PATCH] when !separator, don't add the focus_line_width to width/height (happens 2005-07-13 Kristian Rietveld * gtk/gtktreeview.c (validate_row): when !separator, don't add the focus_line_width to width/height (happens in _column_cell_get_size), but do add the vertical-separator to height, we weren't taking this into account before. * gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup): take vertical-separator into account. (#309137, Ross Burton). --- ChangeLog | 10 ++++++++++ ChangeLog.pre-2-10 | 10 ++++++++++ ChangeLog.pre-2-8 | 10 ++++++++++ gtk/gtkentrycompletion.c | 7 +++++++ gtk/gtktreeview.c | 6 +++--- 5 files changed, 40 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 677891235f..bc5db9595e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2005-07-13 Kristian Rietveld + + * gtk/gtktreeview.c (validate_row): when !separator, don't add + the focus_line_width to width/height (happens in + _column_cell_get_size), but do add the vertical-separator to height, + we weren't taking this into account before. + + * gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup): + take vertical-separator into account. (#309137, Ross Burton). + 2005-07-13 Matthias Clasen * tests/treestoretest.c: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 677891235f..bc5db9595e 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,13 @@ +2005-07-13 Kristian Rietveld + + * gtk/gtktreeview.c (validate_row): when !separator, don't add + the focus_line_width to width/height (happens in + _column_cell_get_size), but do add the vertical-separator to height, + we weren't taking this into account before. + + * gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup): + take vertical-separator into account. (#309137, Ross Burton). + 2005-07-13 Matthias Clasen * tests/treestoretest.c: diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 677891235f..bc5db9595e 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,13 @@ +2005-07-13 Kristian Rietveld + + * gtk/gtktreeview.c (validate_row): when !separator, don't add + the focus_line_width to width/height (happens in + _column_cell_get_size), but do add the vertical-separator to height, + we weren't taking this into account before. + + * gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup): + take vertical-separator into account. (#309137, Ross Burton). + 2005-07-13 Matthias Clasen * tests/treestoretest.c: diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c index 28b8f99511..258356f361 100644 --- a/gtk/gtkentrycompletion.c +++ b/gtk/gtkentrycompletion.c @@ -1321,6 +1321,7 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion) gint matches, items, height, x_border, y_border; GdkScreen *screen; gint monitor_num; + gint vertical_separator; GdkRectangle monitor; GtkRequisition popup_req; GtkRequisition entry_req; @@ -1341,6 +1342,12 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion) gtk_tree_view_column_cell_get_size (completion->priv->column, NULL, NULL, NULL, NULL, &height); + gtk_widget_style_get (GTK_WIDGET (completion->priv->tree_view), + "vertical-separator", &vertical_separator, + NULL); + + height += vertical_separator; + if (items <= 0) gtk_widget_hide (completion->priv->scrolled_window); else diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index 7d1eaabf8e..d1978ecb40 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -4587,6 +4587,7 @@ validate_row (GtkTreeView *tree_view, GList *list; gint height = 0; gint horizontal_separator; + gint vertical_separator; gint focus_line_width; gint depth = gtk_tree_path_get_depth (path); gboolean retval = FALSE; @@ -4609,6 +4610,7 @@ validate_row (GtkTreeView *tree_view, "focus-padding", &focus_pad, "focus-line-width", &focus_line_width, "horizontal-separator", &horizontal_separator, + "vertical-separator", &vertical_separator, NULL); for (list = tree_view->priv->columns; list; list = list->next) @@ -4633,9 +4635,7 @@ validate_row (GtkTreeView *tree_view, if (!is_separator) { - tmp_width += 2 * focus_line_width; - tmp_height += 2 * focus_line_width; - + tmp_height += vertical_separator; height = MAX (height, tmp_height); height = MAX (height, tree_view->priv->expander_size); } -- 2.30.2